#include<Arduino.h>
#include<variant.h>
#define X1 PC2
#define X2 PC3
#define X3 PA0
#define X4 PA1
#define XA1	PB0
#define XP1 PB1
#define YA1	PA4
#define YA2	PA5
#define Y1	PF11
#define Y2	PF12
#define Y3	PF13
#define Y4	PF14
#define Y5	PF15
#define Y6	PG0
#include "flashFs.h"
extern const char *hwModel;
extern const int build;
#include "Rtc_Pcf8563.h"
extern Rtc_Pcf8563 pcf8563;

#include <STM32RTC.h>
extern STM32RTC &rtc ;

#include <ArduinoRS485.h>
extern RS485Class serial2;
extern RS485Class serial3;
extern RS485Class serial4;
extern RS485Class serial5;

extern unsigned int uptime;
extern const char *hwModel;
#include "pt100_hx711.h"
extern pt100_hx711 pt100;

extern uint8_t xx1, xx2, xx3, xx4, xp1;
extern uint8_t yy1, yy2, yy3, yy4, yy5, yy6;
extern uint16_t ya1, ya2;
extern int xa1, xt1, xr1;
typedef struct
{
    char xx1, xx2, xx3, xx4, yy1, yy2, yy3, yy4, yy5, yy6;
    unsigned short xa1, ya1, ya2;
    float xt1;
} IOVAR;
extern IOVAR io;
extern uint16_t year, wdg_time;
extern uint8_t month, day, hour, minute, second, week, wdg_en, reboot, ip1, ip2, ip3, ip4, rtc_write;

class KC1110
{
public:
    KC1110();
    void baseinit();
    void begin();
    void io_init();
    void input();
    void output();
};
extern FlashFs flash_fs;
extern KC1110 board;